Skip to content

Fix security_groups for c8/suse#5354

Merged
yadvr merged 2 commits into
apache:4.15from
shapeblue:fix-sg
Aug 24, 2021
Merged

Fix security_groups for c8/suse#5354
yadvr merged 2 commits into
apache:4.15from
shapeblue:fix-sg

Conversation

@davidjumani
Copy link
Copy Markdown
Contributor

Description

Fixes fetching the bridge name for c8 / suse where the result of virsh domlist contains leading spaces
Used only in component tests, so not a functionality break

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

How Has This Been Tested?

Before :

# virsh domiflist i-2-3-VM |grep -w '02:00:12:b0:00:01'
 vnet6       bridge   cloudbr1   virtio   02:00:12:b0:00:01    <- notice the leading space
# virsh domiflist i-2-3-VM |grep -w '02:00:12:b0:00:01' |tr -s ' '|cut -d ' ' -f3
bridge   <- Displays the second field

After :

# virsh domiflist i-2-3-VM |grep -w '02:00:12:b0:00:01'
 vnet6       bridge   cloudbr1   virtio   02:00:12:b0:00:01    <- notice the leading space
# virsh domiflist i-2-3-VM |grep -w '02:00:12:b0:00:01' | awk '{print $3}'
cloudbr1    <- Displays the bridge name

@davidjumani
Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@davidjumani a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 972

Copy link
Copy Markdown
Member

@weizhouapache weizhouapache left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested on a centos7 env, it works.

Create Vm with multiple NIC's ... === TestName: test_01_create_vm_with_multiple_nics | Status : SUCCESS ===
ok
Create VM with single NIC and then add additional NIC ... === TestName: test_02_add_nic_to_vm | Status : SUCCESS ===
ok
Add secondary IP's to the VM ... === TestName: test_03_add_ip_to_default_nic | Status : SUCCESS ===
ok
Add secondary IP's to remaining NIC's ... === TestName: test_04_add_ip_to_remaining_nics | Status : SUCCESS ===
ok
Stop and Start a VM with Multple NIC ... === TestName: test_05_stop_start_vm_with_multiple_nic | Status : SUCCESS ===
ok
Migrate a VM with Multple NIC ... === TestName: test_06_migrate_vm_with_multiple_nic | Status : SUCCESS ===
ok
Remove secondary IP from any NIC ... === TestName: test_07_remove_secondary_ip_from_nic | Status : SUCCESS ===
ok
Remove NIC from VM ... === TestName: test_08_remove_nic_from_vm | Status : SUCCESS ===
ok
Reboot a VM with Multple NIC ... === TestName: test_09_reboot_vm_with_multiple_nic | Status : SUCCESS ===
ok

----------------------------------------------------------------------
Ran 9 tests in 294.765s

OK

@weizhouapache
Copy link
Copy Markdown
Member

@davidjumani @DaanHoogland
I reverted a minor change in #5348 in this pr.

@davidjumani could you target this pr to 4.15 ?

the issue also exist in ubuntu 20.04, I will create a testing env and run the test (it should work)

@davidjumani davidjumani changed the base branch from main to 4.15 August 23, 2021 07:55
@davidjumani
Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@davidjumani a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@davidjumani
Copy link
Copy Markdown
Contributor Author

Thanks @weizhouapache I also had to force push since I needed to rebase, can you add your changes again

Copy link
Copy Markdown
Member

@yadvr yadvr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM -haven't tested it, we'll need to test on all support distros to confirm this.

@yadvr yadvr added this to the 4.15.2.0 milestone Aug 23, 2021
@blueorangutan
Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian. SL-JID 973

@davidjumani
Copy link
Copy Markdown
Contributor Author

@rhtyd This is used only for verifying the rules for tests, does not affect the functioning of the agent

@weizhouapache
Copy link
Copy Markdown
Member

Thanks @weizhouapache I also had to force push since I needed to rebase, can you add your changes again

@davidjumani thanks. done.

@weizhouapache
Copy link
Copy Markdown
Member

@rhtyd This is used only for verifying the rules for tests, does not affect the functioning of the agent

yes, agree with @davidjumani . it does not impact the functionalities.
it is only used by component test test/integration/component/test_multiple_nic_support.py

@yadvr
Copy link
Copy Markdown
Member

yadvr commented Aug 24, 2021

LGTM then and based on Wei's tests too.
@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@yadvr
Copy link
Copy Markdown
Member

yadvr commented Aug 24, 2021

Nevermind - reviewed this, LGTM. No tests needed as manual tests are provided and BO doesn't run component test with security groups (yet).

@yadvr yadvr merged commit f822547 into apache:4.15 Aug 24, 2021
@blueorangutan
Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian. SL-JID 992

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants